#include <QCoreApplication>
#include <QDebug>
#include <QFileInfo>
#include <QDir>
#include <config.h>
#include <QProcess>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    QFileInfo fileinfo(Config::getAppCMakeConfig());

    qDebug() << fileinfo.fileName();
    qDebug() << fileinfo.filePath();
    qDebug() << fileinfo.absolutePath();
    qDebug() << fileinfo.absoluteFilePath();

    auto dir = fileinfo.absoluteDir();
    qDebug() << "---- dir ----";
    qDebug() << dir.path();
    qDebug() << dir.absolutePath();
    // qDebug() << dir.absoluteFilePath();
    qDebug() << dir.path();

    qDebug() << qEnvironmentVariable("PATH");
    qputenv("PATH", qEnvironmentVariable("PATH").prepend(dir.path() + ":").toUtf8());
    qDebug() << qEnvironmentVariable("PATH");


    return 0;
}
